package com.softwinner.awbt.utils;

import android.util.Log;

/**
 * Created by xiasj on 17-12-18.
 */

public class LOG {
    public static final int LOG_LEVEL_DEBUG = 0;
    public static final int LOG_LEVEL_INFO = 1;
    public static final int LOG_LEVEL_WARN = 2;
    public static final int LOG_LEVEL_ERROR = 3;
    public static final String TAG = "AWBT";

    private static int sLevel = LOG_LEVEL_DEBUG;

    public static void d(String debug) {
        if (sLevel <= LOG_LEVEL_DEBUG) {
            Log.d(TAG, debug);
        }
    }

    public static void i(String info) {
        if (sLevel <= LOG_LEVEL_INFO) {
            Log.i(TAG, info);
        }
    }

    public static void w(String warning) {
        if (sLevel <= LOG_LEVEL_WARN) {
            Log.w(TAG, warning);
        }
    }

    public static void e(String error) {
        if (sLevel <= LOG_LEVEL_ERROR) {
            Log.w(TAG, error);
        }
    }
}
